{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f8ba3161",
   "metadata": {},
   "source": [
    "# Interprebility 6: Test symmetries of trained NN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "87f1e596",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGaCAYAAACSWkBBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAArDklEQVR4nO3deXhU5d3/8c9kIUhiQYUq9OEB9KmlWgUEWSw7LgSsZVVE9h23StGiPlIEfYo7XlVW2cIiioJ1YRE3CCiLBYJLVWwFW0VbUgF/CSZkOb8/vmUTWZLMzD0z9/t1XV7OCcnkmznzPfnkvs+5TygIgkAAAMBbSa4LAAAAbhEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8FyK6wIAuBMEgfbv3y9JqlKlikKhkOOKALjAyADgsf379ysjI0MZGRmHQgEA/xAGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAAAAzxEGAADwHGEAAADPEQYAAPAcYQAAAM8RBgAA8BxhAPBc8J//0jMypFBIuvdexxUBiDbCAAAAniMMAADgOcIA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195EeeuihQFIwZcqUihWLCgvX/m7QoEFQv379Y64IIgwkqGXLlgUpKSmBpODyyy8/NC/0Qz766KMgOTk5kBR06tTppM9NGIg9kdjfJSUlwcCBAwNJwfXXX895AjEkkv19pJycnDKNKiAywrm/j5wKOtF/L7zwQgR/otjgxWnQnTp1Ou59rr+vfv36Ki4ujnBFiKRw7+/S0lINGTJEc+bM0XXXXaf58+d7eelRrIpWf+/atUsSV4+4Fs79PXjw4B/8eHZ2tj799FNdc801qlGjhurWrVueUuMK72rgBEpLSzV48GDNnTtXPXv21IIFCwgCCSwnJ0f16tVT1apVj/r4N998o7vvvluSlJmZ6aI0RMDMmTN/8OMDBgzQp59+qrvuukvNmzePclVuEAbKYebMmVq3bp0kHVpwZubMmVq9erUkqUuXLoeuc0V8mzBhgubOnauMjAydf/75uv/++4/5nC5duqhhw4bRLw5hN3fuXM2cOVPt2rVTnTp1lJ6ers8//1zLli1TXl6eunfvrt69e7suEwg7wkA5rFu3TllZWUd97O2339bbb78tSapbty5hIEHs3LlTkpSXl3fc1czq1q1LGEgQPXr00L59+7RhwwZlZ2dr//79OvPMM9WyZUv169dPvXr1UigUcl0mEHahIAgC10UAAAB3vFyOGAAAHEYYAADAc4QBAAA8RxgAAMBzhAEAADxHGAAAwHOEAQAAPEcYAADAc4QBAAA8RxgAAMBzhAEAADxHGAAAwHP/H9TOIwd5kBhbAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from kan import *\n",
    "from kan.hypothesis import plot_tree\n",
    "\n",
    "f = lambda x: (x[:,[0]]**2 + x[:,[1]]**2) ** 2 + (x[:,[2]]**2 + x[:,[3]]**2) ** 2\n",
    "x = torch.rand(100,4) * 2 - 1\n",
    "plot_tree(f, x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "58c2ece4-a8dc-4b4e-83cc-49a3f04c1ec5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cuda\n",
      "checkpoint directory created: ./model\n",
      "saving model version 0.0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "| train_loss: 1.58e-03 | test_loss: 4.79e-03 | reg: 2.38e+01 | : 100%|█| 100/100 [00:20<00:00,  4.93"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saving model version 0.1\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n",
    "print(device)\n",
    "\n",
    "dataset = create_dataset(f, n_var=4, device=device)\n",
    "model = KAN(width=[4,5,5,1], seed=0, device=device)\n",
    "model.fit(dataset, steps=100);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "c02037c9-c903-4fc8-96bf-c78609ce0696",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGaCAYAAACSWkBBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAta0lEQVR4nO3dd3hUZfr/8c+EhCCJCyKo4NcvqCsirALSXTq6GHBdqiKC9GqDRRb1J6ugKzaEa6VLDSCCAl+lig0CShMIllXRBdxVLGQpXgkEUs7vj3tpIiXJzJyZed6v6/JyzpByZ87cJ588zznPCXie5wkAADgrzu8CAACAvwgDAAA4jjAAAIDjCAMAADiOMAAAgOMIAwAAOI4wAACA4wgDAAA4jjAAAIDjCAMAADiOMAAAgOMIAwAAOI4wAACA4wgDAAA4jjAAAIDjCAMAADiOMAAAgOMIAwAAOI4wAACA4wgDAAA4jjAAAIDjCAMAADiOMAAAgOMIAwAAOC7e7wIA+MfzPB06dEiSVLJk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vkjFHXfccV5fkzAQuUKxv/Py8o6fXNSnT59gl4wiCMX+zs3N9Xbt2uWNGjXKK168uNe2bdtfPcEQ4ReM/Z2enu4lJCR4Dz/88CnPEwZi2MnLVXbr1u2MH9epU6fjN7TYtm3bOb8uYSAyhWJ/5+fnez179vQkeV26dGFFswgSqv4+2XPPPedJ8iZMmFC0YlFkwdrf1atX96pUqXLaFUGEgRi1bNkyLz4+3pPk3XzzzcfnhX7N559/7hUrVsyT5LVq1eqcX5swEHlCsb/z8vK8Hj16eJK8u+66i/MEIkgo+/tk6enpBRpVQGgEc3+fPBV0tv8WL14cwp8oMjhxGnSrVq3OeJ/rX6pSpYpyc3NDXBFCKdj7Oz8/X71799aMGTN05513avbs2U5eehSpwtXfe/bskcTVI34L5v7u1avXrz6flpamr776SrfffrvKlSunSpUqFabUqMK7GjiL/Px89erVSzNnzlTHjh01Z84cgkAMS09P15VXXqlSpUqd8vy+ffv06KOPSpJSUlL8KA0hMHXq1F99vnv37vrqq6/0yCOPqH79+mGuyh+EgUKYOnWq1q1bJ0nHF5yZOnWqVq9eLUlq06bN8etcEd1GjhypmTNnKjk5WZUrV9ZTTz112se0adNGNWrUCH9xCLqZM2dq6tSpatasmSpWrKikpCR98803WrZsmTIzM9W+fXt17tzZ7zKBoCMMFMK6des0a9asU5774IMP9MEHH0iSKlWqRBiIEbt375YkZWZmnnE1s0qVKhEGYkSHDh108OBBbdiwQWlpaTp06JDKlCmjhg0b6p577lGnTp0UCAT8LhMIuoDneZ7fRQAAAP84uRwxAAA4gTAAAIDjCAMAADiOMAAAgOMIAwAAOI4wAACA4wgDAAA4jjAAAIDjCAMAADiOMAAAgOMIAwAAOI4wAACA4/4/AkvbpkMiFu8AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model.tree(sym_th=1e-2, sep_th=5e-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2c2f31d6-be08-4bb8-a678-2c0d3f456722",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
